import 'package:flutter/material.dart';
import 'package:ost_flutter_module/common/adapt.dart';

class NonePaddingFlatButton extends StatelessWidget {
  final String text;
  final double fontSize;
  final double horizontalPadding;
  final double verticalPadding;
  final Color textColor;
  final VoidCallback onTap;

  const NonePaddingFlatButton(
      {Key key,
      @required this.text,
      this.fontSize = 14,
      this.horizontalPadding = 6,
      this.verticalPadding = 10,
      this.textColor = Colors.black,
      @required this.onTap})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTap,
      borderRadius: BorderRadius.circular(Adapt.px(2)),
      child: Padding(
        padding: EdgeInsets.symmetric(
            horizontal: horizontalPadding, vertical: verticalPadding),
        child: Text(
          text,
          style: TextStyle(fontSize: fontSize, color: textColor),
        ),
      ),
    );
  }
}
